package unittests;


import java.util.ArrayList;
import java.util.List;

import sgi.details_new.ImageDetails;
import sgi.user.Customer;
import junit.framework.Assert;
import junit.framework.TestCase;

public class PurchaseSampleTest extends TestCase {
	

	PurchaseSample PurchaseSample = new PurchaseSample();
	
	protected void setUp() throws Exception {
		super.setUp();
	}
	
	public void testPurchaseSample() 
	{	
		//purchase sample completed successfully	TEST 1
		boolean result_1 = PurchaseSample.purchase("Almog", 30);
		Assert.assertTrue(result_1);
		
		//purchase sample - insufficient balance	TEST 2
		boolean result_2 = PurchaseSample.purchase("Ofri", 20);
		Assert.assertFalse(result_2);
		
		//sample not available for imageID			TEST 3
		boolean result_3 = PurchaseSample.purchase("Almog", 10);
		Assert.assertFalse(result_3);
		
		//sample already purchased					TEST 4
		boolean result_4 = PurchaseSample.purchase("Almog", 30);
		Assert.assertFalse(result_4);
		
		
	}
	
	
}
